package com.xingkeduo.util;

import java.time.Instant;

/**
 * @author chi  2019-01-24 17:23
 **/
public class ResponseUtils<T> {

    /**
     * 存储错误信息
     */
    private String msg = "success";

    private String path;

    private Long timestamp = Instant.now().toEpochMilli();

    private T data;

    private String code;

    private int status;
    

    public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public String getPath() {
		return path;
	}

	public void setPath(String path) {
		this.path = path;
	}

	public Long getTimestamp() {
		return timestamp;
	}

	public void setTimestamp(Long timestamp) {
		this.timestamp = timestamp;
	}

	public T getData() {
		return data;
	}

	public void setData(T data) {
		this.data = data;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

    public boolean success(){
        return status == 1;
    }
}

